package com.netease.financial.base.suspendwindow;

import android.content.Context;
import android.view.View;

import com.netease.financial.base.customerservice.CustomerServiceHelper;

/**
 * Created by wyf on 10/9/15.
 */
public class ChatBallUtil {

    public static void initChatBall(Context context) {
        if (!CustomerServiceHelper.sCustomerServiceEnable) {
            return;
        }
        ChatBallHelper.getInstance().init(context);
    }

    public static void register(String activityName) {
        if (!CustomerServiceHelper.sCustomerServiceEnable) {
            return;
        }
        ChatBallHelper.getInstance().register(activityName);
    }

    public static void onResume(String activityName) {
        if (!CustomerServiceHelper.sCustomerServiceEnable) {
            return;
        }
        ChatBallHelper.getInstance().onResume(activityName);
    }

    public static void onPause() {
        if (!CustomerServiceHelper.sCustomerServiceEnable) {
            return;
        }
        ChatBallHelper.getInstance().onPause();
    }

    public static void onConfigurationChanged() {
        if (!CustomerServiceHelper.sCustomerServiceEnable) {
            return;
        }
        ChatBallHelper.getInstance().onConfigurationChanged();
    }

    public static void setOnChatBallClickListener(View.OnClickListener listener) {
        if (!CustomerServiceHelper.sCustomerServiceEnable) {
            return;
        }
        ChatBallHelper.getInstance().setOnChatBallClickListener(listener);
    }

    public static void setUnreadMessageCount(int count) {
        if (!CustomerServiceHelper.sCustomerServiceEnable) {
            return;
        }
        ChatBallHelper.getInstance().setUnreadMessageCount(count);
    }

}
